package com.sumainfor.wx.system.gmio.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.wx.system.gmio.service.LookOverHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Meng
 * @ClassName LookOverHouse
 * @date 2019/8/15 11:13
 * @description: TODO 巡房
 */
@RestController
@RequestMapping("/lookOverHouse")
public class LookOverHouseController {

    @Autowired
    private LookOverHouseService lookOverHouseService;

    /**
     * @Description //TODO 服务获取管家巡房记录
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params, pager]
     * @Date 2019/8/15 16:34
     **/
    @PostMapping("/getUnLookOverHouseList")
    public JsonResult getUnLookOverHouseList(@RequestBody Map<String,Object> params, Pager pager) {

        return lookOverHouseService.getUnLookOverHouseList(params, pager);
    }

    /**
     * @Description //TODO 服务管家增加巡房记录
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/15 17:49
     **/
    @PostMapping("addLookOver")
    public JsonResult addLookOver(@RequestBody Map<String,Object> params) {

        return lookOverHouseService.addLookOver(params);
    }

    /**
     * @Description //TODO 服务管家修改巡房记录
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/22 17:33
     **/
    @PostMapping("updateLookOver")
    public JsonResult updateLookOver(@RequestBody Map<String, Object> params) {

        return lookOverHouseService.updateLookOver(params);
    }

    /**
     * @Description //TODO 获取租客违约分类
     * @return com.sumainfor.common.util.JsonResult
     * @Param []
     * @Date 2019/8/15 18:12
     **/
    @GetMapping("/violation/getViolationList")
    public JsonResult getViolationList() {
        return lookOverHouseService.getViolationList();
    }

    /**
     * @Description //TODO 根据租客违规分类编号获取租客违规内容
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/15 18:13
     **/
    @GetMapping("/violation/getViolationInfoList")
    public JsonResult getViolationInfoList(@RequestParam Map<String,Object>params) {

        return lookOverHouseService.getViolationInfoList(params);
    }

    /**
     * @Description //TODO 根据房源编号获取巡房资料
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/15 18:15
     **/
    @GetMapping("/patrol/getPatrolHousginMap")
    public JsonResult getPatrolHousginMap(@RequestParam Map<String,Object>params) {

        return lookOverHouseService.getPatrolHousginMap(params);
    }

    /**
     * @Description //TODO 获取当前房源租客违规列表
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params, pager]
     * @Date 2019/8/15 18:17
     **/
    @GetMapping("/patrol/getPatrolHousingViolationList")
    public JsonResult getPatrolHousingViolationList(@RequestParam Map<String,Object> params, Pager pager) {

        return lookOverHouseService.getPatrolHousingViolationList(params, pager);
    }

    /**
     * @Description //TODO 获取当前房源历史保洁违规列表
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params, pager]
     * @Date 2019/8/15 18:18
     **/
    @GetMapping("/patrol/getPatrolHousingCleaningList")
    public JsonResult getPatrolHousingCleaningList(@RequestParam Map<String,Object> params, Pager pager) {

        return lookOverHouseService.getPatrolHousingCleaningList(params, pager);
    }

    /**
     * @Description //TODO 根据管家巡房主编号获取巡房资料
     * @return com.sumainfor.common.util.JsonResult
     * @Param [params]
     * @Date 2019/8/15 18:19
     **/
    @GetMapping("/patrol/getPatrol")
    public JsonResult getPatrol(@RequestParam Map<String,Object> params) {

        return lookOverHouseService.getPatrol(params);
    }
}
